KEY.KEY_0 = function(){pressKey(0);}
KEY.KEY_1 = function(){pressKey(1);}
KEY.KEY_2 = function(){pressKey(2);}
KEY.KEY_3 = function(){pressKey(3);}
KEY.KEY_4 = function(){pressKey(4);}
KEY.KEY_5 = function(){pressKey(5);}
KEY.KEY_6 = function(){pressKey(6);}
KEY.KEY_7 = function(){pressKey(7);}
KEY.KEY_8 = function(){pressKey(8);}
KEY.KEY_9 = function(){pressKey(9);}


KEY.KEY_RETURN = function(){
	
	if(curRegion == 'body'){
		navList.setFocus();
	}else{
		$.goIndex();
	}
}

//刷新
KEY.KEY_BTN_RED = function(){
	refreshPage(afterInitData);
	return false;
}

//收藏
KEY.KEY_BTN_GREEN = function(){
	if(curRegion == 'body'){
		var data = mIconList.getFocusData();
		if(data.isLock){
			showGTip(lang.live.favoriteTip2,3);
		}else{
			doFav(data);
		}
	}else{
		showGTip(lang.live.favoriteTip,3);
	}
	$.ClearPageInMemory ();
	return false;
}


//加锁
KEY.KEY_BTN_YELLOW  = function(){
	if(config.showLock){
		var data = mIconList.getFocusData();
		if(data.isLock){		//删除加锁
			doLock(data);
			var str = $.getSession("channel_json");
			eval("var jsonData="+str);
			navList.curItemId = 0;
			var bo = initParseData(jsonData);
			navList.dataList = typeList;  
			navList.setFocus();
			navList.Click(navList.curItemId);
		}else{
			if(!hasPassPassword){
				passBox.show();
			}else{
				doLock(data);
				
				var str = $.getSession("channel_json");
				eval("var jsonData="+str);
				var bo = initParseData(jsonData); 
				 
				navList.curItemId = 0;	
				navList.dataList = typeList;    
				navList.setFocus(); 
				navList.Click(navList.curItemId);
			}
			
		}
		$.ClearPageInMemory ();
		return false;
		
	}
}

//录制
KEY.KEY_BTN_BLUE = function(){
	if(config.showRecord){
		if($.IsUsbInsert()){
			if(curRegion == 'body'){
				var data = mIconList.getFocusData();
				$.setParam("obj",data);
				$.gotoPage(PAGE_PATH+'pvr/record_time.html');
			}else{
				$.gotoPage(PAGE_PATH+'pvr/index.html');
			}
		}else{ $.log(lang.pvr.noDisk);
			showGTip(lang.pvr.noDisk,3);
		}
	}
}

KEY.KEY_RECORD = function(){KEY.KEY_BTN_BLUE();}


